package com.kk.hystrix.controller;

import com.kk.hystrix.service.HystrixService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author o_o
 * @date 2022-08-06
 */
@RestController
public class HystrixController {

    @Autowired
    private HystrixService service;

    @GetMapping("/hystrix/normal")
    public String normal() {
        return service.normal();
    }

    @GetMapping("/hystrix/abnormal")
    public String abnormal() {
        return service.abnormal();
    }

    @GetMapping("/zipkin")
    public String zipkin() {
        return "Hello, welcome zipkin";
    }

}
